import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsNumber, IsOptional, IsString } from 'class-validator';

export class SizeEntity {
  id: string;
  @ApiProperty({
    description: '名称',
    default: null,
  })
  @IsString()
  name: string;
  @ApiPropertyOptional({
    description: '备注信息',
    default: null,
  })
  @IsString()
  @IsOptional()
  description?: string;

  @ApiPropertyOptional({
    description: '排序',
    default: null,
  })
  @IsOptional()
  @IsNumber()
  weight: number;

  isDelete: boolean;
}
